Position encoders accurately measure linear and angular displacements of external measurement devices such as x-ray diffractometers, optical spectrometers, and micropositioners. Typical encoders include a position-measuring component, such as a rotating shaft, connected to the external measurement device. The shaft is rotated as the measurement device is adjusted. The encoder, in response, generates one or more analog electrical signals correlated to the degree of rotation. These signals are then processed by an external processing element to determine the position of the measurement device.
High-resolution encoders, such as the Cannon K1 encoder, typically include an optical element for generating the analog electrical signals. For example, Cannon's encoder includes a diode laser and a miniaturized optical system connected to the rotating shaft. The optical system modulates the intensity of the diode laser's optical output as the shaft is rotated. The modulation results in a series of sinusoidal oscillations or "pulses" in the optical output. The number of oscillations or pulses is related to the degree to which the shaft is rotated. The modulated optical output is detected with a pair of light-sensitive diodes housed within the encoder. These diodes generate electrical analog signals in response to the modulated optical output.
The K1 encoder is configured to generate quadrature analog electrical signals. These signals, Signals A and B, are sinusoidally modulated at frequencies up to 500 kHz and are separated in phase by 90.degree.. Typically, signals A and B include 81,000 sinusoidal pulses for each 360.degree. revolution of the rotating shaft (Cannon K-1 Encoder and CI40-2 Circuit Specification Sheet, 1994).
Analog signals from the K1 encoder are processed by an external interpolation circuit to measure position. This circuit makes a low-resolution measurement based on a counting of the number of sinusoidal pulses from the encoder. Finer position measurements are obtained from the phase of the signals.
The Cannon Encoder CI40-2 Interpolator is an example of such a circuit. This circuit can be interfaced with the K1 encoder. In a typical application, the circuit divides a single analog sinusoidal pulse from the encoder into 40 square pulses. Each square pulse is then counted by an external device, such as a computer, to determine the position of the external measurement device.
The CI40-2 and other similar interpolation circuits are susceptible to several types of errors which may degrade their ability to accurately measure position. For example, these circuits may generate electrical pulse trains in response to high frequency noises such as radio signals. The noise-induced pulse train may be mixed with the digital output from the circuit, causing the computer to loose track of the encoder's position. In addition, the circuit may yield inaccurate position measurements if the input signals, Signals A and B, are not perfectly quadrature i.e., they are phase-shifted by greater or less than 90.degree.. These systems, therefore, are unable to make high-resolution position measurements. Conventional circuits are typically expensive and can only be used with a single encoder at any one time.
Another problem comes from any lack of synchronization between the stages. If the phase value from the high precision stage has a low absolute value (e.g., &lt;5.degree. or &lt;175.degree.), mis-synchronization between the stages can cause the reading to be a whole quadrant off.
To overcome these and other limitations, Applicants' invention provides a signal analysis system for processing signals from an encoder to provide high-resolution position measurements. The system includes a hardware component for converting analog input signals into digital waveforms. The hardware component is coupled to a computational component which determines the phase values of the digital waveforms and compensates for input signals which are non-quadrature or have other errors. The phase value, in turn, is analyzed to make a position measurement. By combining the hardware and computational components in this way, the system can rapidly interpret encoder signals to make position measurements with high resolution and accuracy.
Moreover, the system minimizes the effects of high-frequency background noise which can interfere with the process of counting the square pulses.
A feature of the invention is a special technique that limits the operation in a way that avoids misalignment errors caused by separate operating stages. This can preferably be done in software, minimizing any incremental cost. The signal analysis system may be used with a variety of encoder systems.
Preferred embodiments include a hardware component for receiving the analog signals from the encoder. The hardware component digitizes these signals to generate low and high-resolution waveforms. These waveforms are then further processed and sent as first and second data streams to the computational component of the signal analysis system. The first data stream includes an integer value representing the total number of sinusoidal pulses in the analog signal. The second data stream includes a pair of digitized quadrature (or non-quadrature) signals.
A position measurement having high and low-resolution components is made by processing the data streams with the computational component to determine the absolute phase angle (.THETA.) of one of the encoder's analog signals. A low-resolution component of .THETA. is related to the integer number of sinusoidal pulses in the analog signals. A high-resolution component is determined by measuring the final phase angle .THETA.' corresponding to the final sinusoidal pulse. Thus, the low-resolution component of .THETA. is an integer multiple of 2.pi. and the high-resolution component has a value between 0 and 2.pi.. The absolute phase angle .THETA. is the sum of these components. Once determined, .THETA. is compared to a series of calibration factors to determine the position of the external measurement device.
The hardware component includes two analog-to-digital (A/D) stages for processing the encoder's quadrature signals. Low-resolution A/D conversions are preferably made in the first stage with a comparator. The comparator processes the analog signals to generate a single digitized square waveform containing a series of square pulses. The square pulses are then counted using, for example, a quadrature up/down counter to determine the integer number of sinusoidal pulses. High-resolution A/D conversions are made with an N-bit A/D converter to generate a digital sinusoidal waveform for each quadrature analog signal. The resolution of the waveform is determined by the value of N. The hardware component additionally includes an amplifying/filtering circuit for processing the analog signals prior to digitization. This circuit further increases the performance of both the high and low-resolution stages.
The first and second data streams generated by the hardware component are sent to the computational component for processing. In a preferred embodiment, the computational component mathematically represents the data in the data streams as a two-dimensional vector bound at one end to the origin of a two-dimensional space. The number of times the vector circles the origin is related to the first data stream (i.e., the integer number of sinusoidal pulses). The position of the vector within its final rotation is related to the second data stream (i.e., the phase of the final sinusoidal pulse). Further mathematical steps may be employed to account for analog signals from the encoder which are non-quadrature. An additional step may be used to ensure that the first and second data streams are synchronized. Once determined, the absolute phase angle can be determined and used to make the position measurement.
These and other advantages will be apparent from the following detailed description, and from the claims.